-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test-tls-check-server-identity var->const, assert, string template #9986
Conversation
Please see the commit message guidelines here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there!
assert.strictEqual(err && err.reason, | ||
test.error, | ||
`Test# ${i} failed: ${util.inspect(test)} \n | ||
${test.error} != ${(err && err.reason)}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid multi-line template literals, especially given that the additional whitespace will be included in the string.
`Test# ${i} failed: ${util.inspect(test)} \n` +
`${test.error} != ${(err && err.reason)}`);
var assert = require('assert'); | ||
var util = require('util'); | ||
const common = require('../common'); | ||
const assert = require('assert'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move the assert and util requires after the hasCrypto check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried removing the block
if (!common.hasCrypto) {
common.skip('missing crypto');
return;
}
but module common is not used "error 'common' is assigned a value but never used no-unused-vars".
Then when I remove the require for common I get "error Mandatory module "common" must be loaded required-modules"
The util requires in used in the string template, can't remove that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@koxauvin Please don't remove the hasCrypto
check. It is needed for this test. But please move the assignments to assert
and util
to be after that block.
Changed var to const, assert.equal to assert.strictEqual, and used a template string for error output.
Converted multi-line string template literals to string concatentation.
Converted multi-line string template literals to string concatentation.
Lone CI failure is a Jenkins/build issue and unrelated to the changes here. |
Changed var to const, assert.equal to assert.strictEqual, and used a template string for error output. PR-URL: nodejs#9986 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in b00f8ad. |
Changed var to const, assert.equal to assert.strictEqual, and used a template string for error output. PR-URL: #9986 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Changed var to const, assert.equal to assert.strictEqual, and used a template string for error output. PR-URL: #9986 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Changed var to const, assert.equal to assert.strictEqual, and used a template string for error output. PR-URL: #9986 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Changed var to const, assert.equal to assert.strictEqual, and used a template string for error output. PR-URL: #9986 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Changed var to const, assert.equal to assert.strictEqual, and used a template string for error output. PR-URL: #9986 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Changed var to const, assert.equal to assert.strictEqual, and used a template string for error output. PR-URL: #9986 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Changed var to const, assert.equal to assert.strictEqual, and used a template string for error output. PR-URL: #9986 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test
Description of change
Changed var to const, assert.equal to assert.strictEqual, and used a template string for error output.